home *** CD-ROM | disk | FTP | other *** search
/ Aminet 6 / Aminet 6 - June 1995.iso / Aminet / gfx / 3d / irit50src.lha / irit5 / symb_lib / symb_ftl.c < prev    next >
Encoding:
C/C++ Source or Header  |  1994-09-23  |  1.7 KB  |  34 lines

  1. /******************************************************************************
  2. * Symb_ftl.c - default FatalError function for the symb library.          *
  3. *******************************************************************************
  4. * Written by Gershon Elber, April. 93.                          *
  5. ******************************************************************************/
  6.  
  7. #include <stdio.h>
  8. #include "symb_loc.h"
  9.  
  10. /*****************************************************************************
  11. * DESCRIPTION:                                                               M
  12. * Trap Symb_lib errors right here. Provides a default error handler for the  M
  13. * symb library. Gets an error description using SymbDescribeError, prints it M
  14. * and exit the program using exit.                                           M
  15. *                                                                            *
  16. * PARAMETERS:                                                                M
  17. *   ErrID:      Error type that was raised.                                  M
  18. *                                                                            *
  19. * RETURN VALUE:                                                              M
  20. *   void                                                                     M
  21. *                                                                            *
  22. * KEYWORDS:                                                                  M
  23. *   SymbFatalError, error handling                                           M
  24. *****************************************************************************/
  25. void SymbFatalError(SymbFatalErrorType ErrID)
  26. {
  27.     char
  28.     *ErrorMsg = SymbDescribeError(ErrID);
  29.  
  30.     fprintf(stderr, "SYMB_LIB: %s\n", ErrorMsg);
  31.  
  32.     exit(-1);
  33. }
  34.